import './assets/main.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Globalcom from '@/components/Globalcom.vue'

// 引入store
import store from '@/store'


const app = createApp(App)
// 全局自定义指令
app.directive('color', {
    mounted(el, binding) {
        el.style.background = binding.value
    }
})
// 注册全局组件 
// 全局组件弊端就是即使注册了在项目中并没有使用, 该全局组件也会打包到生产包了
app.component('globalcom', Globalcom);
app.use(router)
app.use(store)
app.mount('#app')
